<#include "header.htm"/>
<#--
<link rel="alternate" type="application/rss+xml" title="RSS" href="${contextPath}/rss/forums${extension}" />
-->
		 <table cellspacing="0" cellpadding="1" width="100%" align="center" border="0">
				<tr>
					<td valign="bottom" align="left">
					<#if logged>
					    <span class="gensmall">${I18n.getMessage("ForumListing.lastVisit")}: ${lastVisit}</span><br />
					</#if>
						<span class="gensmall">${I18n.getMessage("ForumListing.date")}: ${now}</span><br />
						<span class="forumlink"><a class="forumlink" href="${JForumContext.encodeURL("/forums/list")}">${I18n.getMessage("ForumListing.forumIndex")}</a></span>
					</td>
					<td class="gensmall" valign="bottom" align="right">&nbsp;
					<#if logged>
						<a class="gensmall" href="${JForumContext.encodeURL("/forums/newMessages")}">${I18n.getMessage("ForumListing.readLastVisitMessages")}</a>
					</#if>
					</td>
				</tr>
			</table>
			
			<table class="forumline"   cellspacing="1" cellpadding="0" width="100%" border="0">
				<tr>
					<th class="thcornerl" nowrap="nowrap"     align="center"  >&nbsp;状态&nbsp;</th>
					<th class="thtop" nowrap="nowrap"     align="center"  >&nbsp;${I18n.getMessage("ForumListing.forums")}&nbsp;</th>
					<th class="thtop"    nowrap="nowrap" align="center" width="250">&nbsp;${I18n.getMessage("ForumIndex.forumAdmins")}&nbsp;</th>
					<th class="thtop" nowrap="nowrap" align="center" width="100">&nbsp;${I18n.getMessage("ForumListing.totalTopics")}&nbsp;</th>
					<th class="thcornerr" nowrap="nowrap" align="center" width="100">&nbsp;${I18n.getMessage("ForumListing.totalMessages")}&nbsp;</th>
				</tr>
 
		         <tr>
		          	  <td   class="row3" height="30"><img src="${contextPath}/templates/${templateName}/images/folder_new_big.gif" alt="[New Folder]" /></td>
		          
		              <td   class="row3"    height="25" onmouseover="style.backgroundColor='#E8E8E8'" onmouseout="style.backgroundColor='#fafafa'">
		              <span class="forumlink"><a id="allTopic"   href="${JForumContext.encodeURL("/allTopics/list")}" >${I18n.getMessage("ForumBase.allForum")}</a></span>&nbsp;
		              </td>
		              <td   class="forumlistRow" valign="middle" align="center" height="25" nowrap="nowrap" width="250">&nbsp;&nbsp;</td>
		              <td  class="forumlistRow" valign="middle" align="center" height="25" nowrap="nowrap" width="100">&nbsp;&nbsp;</td>
		              <td class="forumlistRow" valign="middle" align="center" height="25" nowrap="nowrap" width="100">&nbsp;&nbsp;</td>
		          </tr>
				<!-- START FORUM LISTING -->
				<#list allCategories as category>
					<tr >
						<td class="catleft"  colspan="5" align="left"><span class="cattitle">${category.name}</span>&nbsp;</td>
	<#--				<td class="catright"  colspan="3" > &nbsp;</td> -->
					</tr>

					<#list category.getForums() as forum>
					<#assign lpi = forumRepository.getLastPostInfo(forum.id)/>
					<tr>
                        <td class="row3" valign="middle" align="center" height="30">
						<#if forum.unread>
							<img src="${contextPath}/templates/${templateName}/images/folder_new_big.gif" alt="[New Folder]" />
						<#else>
							<img src="${contextPath}/templates/${templateName}/images/folder_big.gif" alt="[Folder]" />
						</#if>
						</td>
						<td  class="row3" valign="middle"  width="100%"  height="22px" onmouseover="style.backgroundColor='#E8E8E8'" onmouseout="style.backgroundColor='#f7f7f8'" >
							<span class="forumlink"  > <a class="forumlink"   href="${JForumContext.encodeURL("/forums/show/${forum.id}")}">
							 ${forum.name?html} 		 
							</a> </span>&nbsp;	
							<#if forum.description?exists>
							<br />
							<span class="genmed">
							${forum.description?default("")}
							</span>
							</#if>
										
						</td>
						 
						<td   class="forumlistRow" valign="middle" align="center"  nowrap="nowrap"   >
						     <span class="gensmall">
						     <#assign moderators = forumRepository.getModeratorList(forum.id)/>
								<#list moderators as m>
								  <#assign users=moderatorRepository.getModeratorsByGroup(m.id)/>
								  <#list users as u>
								  <a href="${JForumContext.encodeURL("/user/profile/${u.id}")}">${u.username?html}</a>  &nbsp;&nbsp;
								  </#list>
 
								 </#list>
                             </span>&nbsp;
						</td>
						<td  class="forumlistRow" valign="middle" align="center" nowrap="nowrap"  >
						   <span class="gensmall">${forum.totalTopics}</span>&nbsp;
						</td>
						<td class="forumlistRow" valign="middle" align="center"   nowrap="nowrap"  >
							<#assign total = forum.totalPosts/>
							<#if (total == 0 && forum.totalTopics > 0)>
								<#assign total = forum.totalTopics/>
							</#if>
							<span class="gensmall">
							<#if (total > 0)>
							${total}<#else>${I18n.getMessage("ForumListing.noMessages")}</span>&nbsp;
						    </#if>
						</td>
 					
					</tr>
					</#list>
				</#list>		
				<!-- END OF FORUM LISTING -->
			</table>
			</br>
<#include "bottom.htm"/>
